package com.bbs.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bbs.pojo.User;
import com.bbs.pojo.dto.UserDto;

import java.util.List;

public interface UserService extends IService<User> {
    /**
     * 获取无密码字段的用户传输对象
     *
     * @param id
     * @return
     */
    UserDto getUserDtoById(String id);

    User getUser(String username);

    List<UserDto> getUserDtos(UserDto userDto);

    boolean register(User user);

    boolean updateExperience(String id, Integer deltaExperience);

    boolean setAvatarById(String id, byte[] avatar);

    boolean RemoveAvatarById(String id);

    boolean addExperience(String id, Integer experience);
}
